package com.hzlx.controller;/*
 *@author liu
 *2024/07/2024/7/25
 *@version
 */

import com.hzlx.common.ResponseBean;
import com.hzlx.service.WithdrawalRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author UP
 * @Date 2024/7/25 17:36
 * @Version 1.0
 * 展示列表
 **/
@Controller
@RequestMapping("/withdrawal_records")
public class WithdrawalRecordsController {
    @Autowired
    private WithdrawalRecordsService withdrawalRecordsService;

    @RequestMapping("/list")
    public String list(){
        return "pages/list";
    }

    @GetMapping("/homeList")
    @ResponseBody
    public ResponseBean homeList(Integer pageIndex, Integer pageSize){
        return withdrawalRecordsService.homeList(pageIndex, pageSize);
    }

    @PostMapping("/agree")
    @ResponseBody
    public ResponseBean agree(Integer flowId){
        return withdrawalRecordsService.agree(flowId);
    }

    @PostMapping("/refuse")
    @ResponseBody
    public ResponseBean refuse(Integer flowId){
        return withdrawalRecordsService.refuse(flowId);
    }
}
